#include<stdio.h>
int main(){
	float gongzi;
	scanf("%f",&gongzi);
	float shui=0;
	if(gongzi<1000)
		shui=0;
	else if(gongzi <2000)
		shui=gongzi*0.1;
	else if(gongzi<3000)
		shui=gongzi*0.15;
	else if(gongzi<4000)
		shui=gongzi*0.2;
	else
		shui=gongzi*0.25;
	printf("%.2f",gongzi-shui);
	return 0;
}
